package com.easygem.common.model.business;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * 客户跟进实体类
 *
 * @author 肖智
 * @version 1.0
 * @Description 客户跟进记录
 * @date 2024/12/26
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("客户跟进实体类")
@Table(name = "`bg_client_follow`")
public class BgClientFollow {

    // 客户跟进 ID，主键，自增
    @Id
    @Column(name = "`followId`")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @ApiModelProperty("客户跟进 ID")
    private Long followId;

    // 资源信息 ID，外键
    @Column(name = "`clientId`")
    @ApiModelProperty("客户 ID")
    private Long clientId;

    // 跟进内容
    @Column(name = "`followContent`")
    @ApiModelProperty("跟进内容")
    private String followContent;

    // 跟进时间，timestamp类型
    @Column(name = "`followTime`")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("跟进时间")
    private Timestamp followTime;

    // 跟进人员 ID
    @Column(name = "`empId`")
    @ApiModelProperty("跟进人员 ID")
    private Long empId;

    // 备注
    @Column(name = "`remark`")
    @ApiModelProperty("备注")
    private String remark;
    // 提醒时间
    @Column(name = "`RemindTime`")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("提醒时间")
    private Timestamp remindTime;

    @TableField(exist = false)
    private transient String nick_name;     //用户昵称

    @TableField(exist = false)
    private transient String clientName;//客户名称
}
